home *** CD-ROM | disk | FTP | other *** search
/ FM Towns: Free Software Collection 9 / FM Towns Free Software Collection 9.iso / t_os / shell / igo / gosource / banx.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-16  |  1.6 KB  |  63 lines

  1. typedef struct {
  2.     int type; 
  3.     int    size;
  4.     int size2; /* 今は未設定 タテヨコが違う時設定予定 */
  5. } BAN_TYPE;
  6.  
  7. /* BAN_TYPEのTYPEの中身 */
  8. #define NORMAL 0
  9. #define DONUTS 1 /* 辺や隅がないモデル*/
  10.  
  11. #define MAX_BANSIZE 19
  12. #define MAX_BANSIZE2 (MAX_BANSIZE+1)*(MAX_BANSIZE+2)+1
  13.  
  14. #define LEFT (-1)
  15. #define RIGHT (+1)
  16.  
  17. struct gcellstruct{
  18.     struct gcellstruct *next;
  19.     struct bancellstruct    *c_ptr;
  20.     struct damecellstruct    *dame_ptr; /* グル-プに接している盤の位置  */
  21.     int        territory_number;        /* グル-プの領域の数 */
  22.     int        dame_number;            /* ダメの数 ( ブランク のみ )*/
  23.     char    iro;                    /* グル-プの色 */
  24.     char    territory_iro;
  25.     char    henkan_territory_iro;
  26. } ;
  27. typedef struct gcellstruct GCELL;
  28.  
  29. struct bancellstruct{
  30.     struct bancellstruct *next;
  31.     struct gcellstruct    *g_ptr;
  32. /*  ban で代替できるから持つ必要がない */
  33. /*
  34.     char iro;
  35.  */
  36. } ;
  37. typedef struct bancellstruct BANCELL;
  38.  
  39. struct damecellstruct{
  40.     struct damecellstruct *next;
  41.     int    ichi;
  42. } ;
  43. typedef struct damecellstruct DAMECELL;
  44.  
  45. extern int banx_init();
  46. extern int banx_uchiage(char ban[], int ichi, int *w_uchiage_number);
  47. extern int banx_handy_set(char ban[], int ichi);
  48. extern int banx_judge(char current_ban[]);
  49. extern char *banx_judgedisp();
  50. extern int banx_territory(int *black_t_number, int *white_t_number);
  51. extern int banx_put(int ichi);
  52.  
  53.  
  54. extern int gcell_init();
  55. extern GCELL *gcell_get();
  56. extern int gcell_free(GCELL *p);
  57. extern int gcell_end();
  58.  
  59. extern int damecell_init();
  60. extern DAMECELL *damecell_get();
  61. extern int damecell_free(DAMECELL *p);
  62. extern int damecell_end();
  63.